Add --consolidated-results switch to log test results to JSON file #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the
--consolidated-resultsfeature from the original PR grosser#630 by grosser/parallel_tests, adding a switch to log test results like tests per process, time taken, and total failures to a specified JSON file.Changes Made
Core Functionality
--consolidated-results [PATH]CLI option that accepts a file path where consolidated test results will be written as JSONRunner Updates
Updated all test runners to support consolidated results:
JSON Output Structure
The consolidated results JSON contains:
{ "tests": { "message": "3 processes for 3 tests, ~ 1 test per process", "tests": 3, "processes": 3, "tests_per_process": 1 }, "summary": { "example": 6, "failure": 1, "message": "6 examples, 1 failure" }, "time_taken": { "seconds": 2, "message": "Took 2 seconds" } }Quiet Mode Support
--consolidated-resultsis specifiedUsage Examples
Use Cases
This feature is particularly useful for:
Testing
The implementation maintains backward compatibility while adding the new consolidated results functionality seamlessly across all parallel test runners.
This pull request was created as a result of the following prompt from Copilot chat.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.